Add Connector API for External Projects Data#8
Merged
hakimalem merged 10 commits intodevelopmentfrom Apr 3, 2025
Merged
Conversation
syphax-bouazzouni
suggested changes
Mar 5, 2025
Collaborator
syphax-bouazzouni
left a comment
There was a problem hiding this comment.
You branch does include 47 files changes, including other changes not related to projects feature, you need to extract only your changes first before I can review this.
Collaborator
|
Other remarks:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Connector API for External Projects Data
Require Update project model and implement external api connectors ontologies_linked_data#4
GitHub Issue: Link to GitHub Issue
New endpoint:
/connector/projectsSupport for data sources:
Guide to Adding a New Connector
Step 1: Create the Connector Class
lib/ontologies_linked_data/concerns/connectors/named after your data source (e.g.,new_source_connector.rb).BaseConnectorclass.build_url: Constructs the appropriate URL for API calls.build_params: Builds query parameters (like ID and acronym searches).map_response: Maps API responses to a standardized format (Project model attributes).Step 2: Add Configuration Settings
lib/ontologies_linked_data/config/config.rb.base_url: Main API URL.source: Source identifier.project_type: Type of project (e.g., "FundedProject").field_mappings: Maps external API fields to internal model attributes (e.g., acronym, name, description).funder: Configuration for the funding organization (e.g., name, homepage).Usage Examples
ANR Projects
CORDIS Projects
Response example :